﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Branches.aspx.cs" Inherits="Branches_Branches" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <title>Sucursales</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
     <h2>
         Sucursales&nbsp;<asp:ImageButton ID="ImageButton1" runat="server" 
                ImageUrl="~/Images/icon_add.png" onclick="ImageButton_Click1" />
    </h2>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
        AutoGenerateColumns="False" CellPadding="4" DataKeyNames="BranchId" 
        DataSourceID="EntityDataSource1" ForeColor="#333333" GridLines="None" 
        style="margin-right: 3px" Width="100%">
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:CommandField AccessibleHeaderText="Editar" ButtonType="Image" 
                CancelImageUrl="~/Images/icon_cancel.png" EditImageUrl="~/Images/icon_edit.png" 
                HeaderText="Editar" ShowEditButton="True" 
                UpdateImageUrl="~/Images/icon_ok.png" />
            <asp:BoundField DataField="BranchId" HeaderText="BranchId" ReadOnly="True" 
                SortExpression="BranchId" Visible="False" />
            <asp:BoundField DataField="BranchName" HeaderText="Sucursal" 
                SortExpression="BranchName" />
            <asp:BoundField DataField="BranchLatitude" HeaderText="Latitud" 
                SortExpression="BranchLatitude" />
            <asp:BoundField DataField="BranchLongitude" HeaderText="Longitud" 
                SortExpression="BranchLongitude" />
            <asp:CommandField AccessibleHeaderText="Eliminar" ButtonType="Image" 
                DeleteImageUrl="~/Images/icon_delete.png" HeaderText="Borrar" 
                ShowDeleteButton="True" />
        </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#F5F7FB" />
        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
        <SortedDescendingCellStyle BackColor="#E9EBEF" />
        <SortedDescendingHeaderStyle BackColor="#4870BE" />
    </asp:GridView>
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        CellPadding="4" DataKeyNames="BranchId" DataSourceID="EntityDataSource1" 
        DefaultMode="Insert" ForeColor="#333333" GridLines="None" Height="50px" 
        oniteminserted="DetailsView1_ItemInserted" Visible="False" Width="125px">
        <AlternatingRowStyle BackColor="White" />
        <CommandRowStyle BackColor="#D1DDF1" Font-Bold="True" />
        <EditRowStyle BackColor="#2461BF" />
        <FieldHeaderStyle BackColor="#DEE8F5" Font-Bold="True" />
        <Fields>
            <asp:BoundField DataField="BranchId" HeaderText="BranchId" ReadOnly="True" 
                SortExpression="BranchId" Visible="False" />
            <asp:BoundField DataField="BranchName" HeaderText="Sucursal" 
                SortExpression="BranchName" />
            <asp:BoundField DataField="BranchLatitude" HeaderText="Latitud" 
                SortExpression="BranchLatitude" />
            <asp:BoundField DataField="BranchLongitude" HeaderText="Longitud" 
                SortExpression="BranchLongitude" />
            <asp:CommandField ShowInsertButton="True" />
        </Fields>
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
    </asp:DetailsView>
    <asp:EntityDataSource ID="EntityDataSource1" runat="server" 
        ConnectionString="name=ObligatorioDotNetEntities" 
        DefaultContainerName="ObligatorioDotNetEntities" EnableFlattening="False" 
        EntitySetName="Branches" EnableDelete="True" EnableInsert="True" 
        EnableUpdate="True" EntityTypeFilter="Branch">
    </asp:EntityDataSource>
    <asp:hyperlink ID="Hyperlink1" runat="server" NavigateUrl = "~/Products/Products.aspx">Productos</asp:hyperlink>
    <asp:hyperlink ID="Hyperlink2" runat="server" NavigateUrl = "~/Users/Users.aspx">Usuarios</asp:hyperlink>
    <asp:hyperlink ID="Hyperlink3" runat="server" NavigateUrl = "~/Providers/Providers.aspx">Proveedores</asp:hyperlink>
</asp:Content>
